package com.twotwoshop.service.order.controller;


import com.twotwoshop.domin.common.dtos.ResponseResult;
import com.twotwoshop.service.order.service.IOrderDetailService;
import com.twotwoshop.service.order.service.OrderService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 订单详情表 前端控制器
 * </p>
 *
 * @author 王帅
 * @since 2024-12-24
 */
@RestController
@RequestMapping("/order/detail")
@Log4j2
@RequiredArgsConstructor
public class OrderDetailController {

    private final IOrderDetailService orderDetailService;


    /**
     *  查询订单详情
     *
     * @return historySearchDto
     */
    @GetMapping("/{orderId}")
    public ResponseResult findOrderDetil(@PathVariable Long orderId){

        log.info("查询订单详情,{}");

        return orderDetailService.orderService(orderId);
    }


}
